package com.itheima.mybatis_plus.entity;

import java.util.Date;
import java.util.List;

public class Student {
	private Integer sid;
	private String sname;
	private String sex;
	private Date birthday;
	private Integer cno;
	private Classes classes;
	private List<Course> courses;

	public void setSid(Integer sid) {
		this.sid = sid;
	}
	
	public Integer getSid() {
		return this.sid;
	}
	
	public void setSname(String sname) {
		this.sname = sname;
	}
	
	public String getSname() {
		return this.sname;
	}
	
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	public String getSex() {
		return this.sex;
	}
	
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	public Date getBirthday() {
		return this.birthday;
	}
	
	public void setCno(Integer cno) {
		this.cno = cno;
	}
	
	public Integer getCno() {
		return this.cno;
	}
	

	@Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) {return false;}
        Student that = (Student) o;
        return sid.equals(that.sid);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(sid);
    }

	@Override
	public String toString() {
		return "Student{" +
				"sid=" + sid +
				", sname='" + sname + '\'' +
				", sex='" + sex + '\'' +
				", birthday=" + birthday +
				", cno=" + cno +
				", courses=" + courses +
				'}';
	}
}